/**
 * Sonar iOS Client Application
 * Extension for Sonar, open source software quality management tool.
 * Copyright (C) 2011 Maris Plots
 * mailto: maris.plots@gmail.com
 *
 * Sonar iOS Client Application is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * Sonar iOS Client Application is distributed in the hope that it will be 
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with Sonar iOS Client Application; if not, write to the Free 
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
 */

#import "AbstractRESTServiceHandlerSubclass.h"
#import "GetResourcesService.h"
#import "Resource.h"

@implementation GetResourcesService
@synthesize resource = resource_;
@synthesize metrics = metrics_;
@synthesize depth = depth_;
@synthesize scopes = scopes_;
@synthesize qualifiers = qualifiers_;
@synthesize verbose = verbose_;
@synthesize includetrends = includetrends_;
@synthesize includealerts = includealerts_;
@synthesize rules = rules_;
@synthesize rule_categories = rule_categories_;
@synthesize rule_priorities = rule_priorities_;

#pragma mark -
#pragma mark Memory management
#pragma mark -
- (void)dealloc{
    [resource_ release]; resource_ = nil;
    [metrics_ release]; metrics_ = nil;
    [currentResource_ release]; currentResource_ = nil;
    [super dealloc];
}

#pragma mark -
#pragma mark Abstract Protected methods
#pragma mark -
- (NSString *)sonar_urlPathComponents{
    return @"/api/resources";
}

- (NSString *)sonar_responseFormat{
    return kAbstractRESTServiceHandlerResponseFormatXML;
}

- (BOOL)sonar_validParserTagStackString:(NSString *)string{
    return YES;
}

#pragma mark -
#pragma mark Parsing methods
#pragma mark -
- (void)sonar_getResources{
    self.responseDataObject = [NSMutableArray array];
}

- (void)sonar_getResources_resource{
    currentResource_ = [[Resource alloc] init];
}

- (void)sonar_setResources_currentResource_id:(NSString *)string{
    
}

- (void)sonar_setResources_currentResource_key:(NSString *)string{
    
}

- (void)sonar_setResources_currentResource_name:(NSString *)string{
    currentResource_.objectName = string;
}

- (void)sonar_setResources_currentResource_lname:(NSString *)string{

}

- (void)sonar_setResources_currentResource_branch:(NSString *)string{

}

- (void)sonar_setResources_currentResource_scope:(NSString *)string{
    currentResource_.objectScope = string;
}

- (void)sonar_setResources_currentResource_qualifier:(NSString *)string{
    currentResource_.objectQualifier = string;
}

- (void)sonar_setResources_currentResource_lang:(NSString *)string{
    currentResource_.objectLang = string;
}

- (void)sonar_setResources_currentResource_version:(NSString *)string{
    currentResource_.objectVersion = string;
}

- (void)sonar_setResources_currentResource_date:(NSString *)string{
    
}

- (void)sonar_setResources_resource:(id)_nil{
    [self.responseDataObject addObject:currentResource_];
    [currentResource_ release]; currentResource_ = nil;
}




@end
